﻿@model SignalRChat.Models.UserViewModel

@{
    ViewBag.Title = "Register";
}

<h2>Register</h2>

@using (Html.BeginForm("Register", "Account", new { ReturnUrl = "" }, FormMethod.Post)) 
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>UserViewModel</h4>
        <hr />
        @Html.ValidationSummary(true)

        <div class="form-group">
            @Html.LabelFor(model => model.UserName, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.UserName)
                @Html.ValidationMessageFor(model => model.UserName)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Password, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Password)
                @Html.ValidationMessageFor(model => model.Password)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ConfirmPassWord, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.ConfirmPassWord)
                @Html.ValidationMessageFor(model => model.ConfirmPassWord)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.UserFirstName, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.UserFirstName)
                @Html.ValidationMessageFor(model => model.UserFirstName)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.UserLastName, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.UserLastName)
                @Html.ValidationMessageFor(model => model.UserLastName)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.UserGender, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.UserGender)
                @Html.ValidationMessageFor(model => model.UserGender)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.UserCompany, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.UserCompany)
                @Html.ValidationMessageFor(model => model.UserCompany)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.UserDesignation, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.UserDesignation)
                @Html.ValidationMessageFor(model => model.UserDesignation)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.UserIsActive, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.UserIsActive)
                @Html.ValidationMessageFor(model => model.UserIsActive)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.UserType, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.UserType)
                @Html.ValidationMessageFor(model => model.UserType)
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
